-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-extractor] Implement "ae-internal-missing-underscore" warning #1170
Conversation
- Introduce ExtractorMessage.properties to track the affected name
…portName is present, then the warning messages are written next to the associated export statement, rather than next to the declaration
class A { | ||
} | ||
|
||
// Warning: (ae-internal-missing-underscore) The name B should be prefixed with an underscore because the declaration is marked as "@internal" | ||
export { A as B } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an example where the warning is associated with the export statement.
@@ -60,11 +60,15 @@ export namespace EntangledNamespace { | |||
// @alpha | |||
export type ExportedAlias = AlphaClass; | |||
|
|||
// Warning: (ae-internal-missing-underscore) The name InternalClass should be prefixed with an underscore because the declaration is marked as "@internal" | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case the warning is associated with the class declaration, since it uses an inline export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR reintroduces the warning for API items that are marked as
@internal
, but whose name does not start with an underscore. The tricky part of the work involves tagging the warning message so that theReviewFileGenerator
can print the warning next to theexport
statement.Consider this example: